﻿namespace BathroomLocator.Phone
{
    using System;
    using System.Data.Services.Client;
    //using WP7CloudApp1.Phone.Push;
    using Microsoft.Samples.WindowsPhoneCloud.StorageClient;
    using Microsoft.Samples.WindowsPhoneCloud.StorageClient.Credentials;

    public interface ICloudClientFactory
    {
        string UserName { get; }

        string AuthenticationToken { get; }

        IStorageCredentials ResolveStorageCredentials();

        IAuthenticationClient ResolveAuthenticationClient();

        ITableServiceContext ResolveTablesServiceContext(string key = "");

        DataServiceCollection<T> ResolveDataServiceCollection<T>(string key = "");

        ICloudTableClient ResolveCloudTableClient(string key = "");

        ICloudBlobClient ResolveCloudBlobClient(string key = "");

        //ISamplePushUserRegistrationClient ResolvePushNotificationClient();

        void CleanTablesClientsKey(string key);

        void VerifyLoggedIn(Action userAlreadyLoggedInCallback, Action userNotLoggedInCallback);

        void SetUserName(string userName, bool persist = false);

        void SetAuthenticationToken(string authToken, bool persist = false);

        void CleanAuthenticationToken();
    }
}
